<?php
include("function.php");
init_connect_db();
$title = $_POST['title'];
$content = $_POST['content'];
$userId = $_POST['userId'];
$placeId = $_POST['placeId'];
	$dateCreate = date("Y-m-d H:i:s");
	$temp = "INSERT INTO Comments (id, title, content, likes, unlikes, dateCreate, dateEdit, Users_id, Places_id) VALUES (NULL, '$title', '$content', 0, 0,'$dateCreate', '$dateCreate', '$userId', '$placeId')";
	$query = mysql_query($temp);
	if (!$query){
		printf('Could not execut the query');
		exit();
	}
        header('Location: ' . $_SERVER['HTTP_REFERER']);
?>